﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ICSharpCode.MSSQLExtensions.SqlParser
{
    public enum SqlType
    {
        Select,
        From,
        And,
        Begin,
        End,
        Case,
        Join,
        On,
        Inner,
        Where,
        Field,
        Table,
        TableWithSchema,
        View,
        ViewWithSchema,
        Group,
        Order,
        Unknown,
        SingleLineComment,
        StartComment,
        EndComment,
        StartBrace,
        EndBrace,
        Dot,
        As
    }
    public class SqlWord
    {
        public SqlType SqlType { get; set; }
        public ICSharpCode.TextEditor.Document.TextWord TextWord { get; set; }
        public long LineSegmentOffset { get; set; }
        public long FullOffset
        {
            get
            {
                return LineSegmentOffset + TextWord.Offset + TextWord.Length - 1;
            }
        }
    }
}
